Reference > WebSphere Commerce Web services > Infrastructure
Infrastructure
Noun OnlineStore
Description
The OnlineStore noun is used to model a WebSphere Commerce store.
The "_wcf.usage" parameter conveys how the information is used by the client. An access control check is performed based on the "usage" parameter provided. If the user is not allowed to use the Management Center for a matching store, this store information will not be returned. If the "usage" parameter is not specified, the access control check for the user on the Management Center is not performed. The following is the list of predefined usage parameter values for the Management Center:
- IBM_CatalogTool
- IBM_MarketingTool
- IBM_PromotionTool
- IBM_AttachmentTool
- IBM_CustomerFacingStore
A customized tool can be created and added to the Management Center. If users of the new tool can access any store (without access control), the usage keyword cannot be specified in the request. If access control is needed, a new usage keyword must be defined and this component must be configured in order to work with the usage keywords.
To do so, a new customized wc-component.xml file (refer to the sample under section "UML Diagram") should be created in the WC_EAR/xml/config/com.ibm.commerce.infrastructure-ext directory.
<?xml version="1.0" encoding="ISO-8859-1"?> <_config:DevelopmentComponentConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:_config="http://www.ibm.com/xmlns/prod/commerce/foundation/config" xsi:schemaLocation="http://www.ibm.com/xmlns/prod/commerce/foundation/config ../xsd/wc-component.xsd "> <_config:valuemappingservice> <_config:valuemapping externalName="StoreType" internalName="StoreType"> <!-- Map tool type to STORE.STORETYPE in database --> <_config:valuemap externalValue="MyCompany_ToolA" internalValue="B2C,B2B" /> </_config:valuemapping> <_config:valuemapping externalName="RoleType" internalName="RoleType"> <!-- Map tool type to ROLE.ROLE_ID in database --> <_config:valuemap externalValue="B2C" internalValue="-9,-4,-8,-16,-13,-1" /> </_config:valuemapping> </_config:valuemappingservice> </_config:DevelopmentComponentConfiguration>
The first valuemapping tag specifies that the tool named, MyCompany_ToolA (any string represents the new tool), can only access stores of store types B2C and B2B. Any store to be returned by this component service for this new tool must satisfy this rule.
The second optional valueamapping tag specifies that only users with roles with role id (in ROLES database table) -9, -4, -8, -16, -13 and -1 can access any stores of store type B2C. This rule also apply to all requests from all tools using this component service.
Default rules are pre-defined in the following file:
WC_EAR/xml/config/com.ibm.commerce.infrastructure/wc-component.xml
The pre-defined rules can be overriden by adding the same rule with different internalValue in the customized file.
In addition to the fore-mentioned rules, an access control policies must be loaded. Here are sample access control user group and policy files. These files should be located at WC_INSTALL/xml/policy/xml directory.
ToolAUserGroup.xml:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE UserGroups SYSTEM "../dtd/ACUserGroups.dtd"> <UserGroups LanguageID="en_US"> <UserGroup Name="ToolAGroupViewersForOrg" OwnerID="RootOrganization" Description="Users who can display tool A group entries for the organization" > <UserCondition><![CDATA[ <profile> <orListCondition> <simpleCondition> <variable name="role"/> <operator name="="/> <value data="Buyer (sell-side)"/> <qualifier name="org" data="OrgAndAncestorOrgs"/> </simpleCondition> <simpleCondition> <variable name="role"/> <operator name="="/> <value data="Category Manager"/> <qualifier name="org" data="OrgAndAncestorOrgs"/> </simpleCondition> <simpleCondition> <variable name="role"/> <operator name="="/> <value data="Product Manager"/> <qualifier name="org" data="OrgAndAncestorOrgs"/> </simpleCondition> <simpleCondition> <variable name="role"/> <operator name="="/> <value data="Seller"/> <qualifier name="org" data="OrgAndAncestorOrgs"/> </simpleCondition> <simpleCondition> <variable name="role"/> <operator name="="/> <value data="Marketing Manager"/> <qualifier name="org" data="OrgAndAncestorOrgs"/> </simpleCondition> <simpleCondition> <variable name="role"/> <operator name="="/> <value data="Sales Manager"/> <qualifier name="org" data="OrgAndAncestorOrgs"/> </simpleCondition> <simpleCondition> <variable name="role"/> <operator name="="/> <value data="Logistics Manager"/> <qualifier name="org" data="OrgAndAncestorOrgs"/> </simpleCondition> <simpleCondition> <variable name="role"/> <operator name="="/> <value data="Account Representative"/> <qualifier name="org" data="OrgAndAncestorOrgs"/> </simpleCondition> </orListCondition> </profile> ]].></UserCondition> </UserGroup> </UserGroups>
This file can be loaded with acugload utility.
ToolAUserPolicy.xml:
<?xml version="1.0" encoding="ISO-8859-1" standalone="no" ?> <!DOCTYPE Policies SYSTEM "../dtd/accesscontrolpolicies.dtd"> <Policies> <Action Name="MyCompany_ToolA" CommandName="MyCompany_ToolA"> </Action> <ResourceCategory Name="com.ibm.commerce.common.objects.StoreEntityResourceCategory" ResourceBeanClass="com.ibm.commerce.common.objects.StoreEntity" PrimaryResourceTable="STOREENT" PrimaryResourceOwnerTable="STOREENT" PrimaryResourceOwnerColumn="MEMBER_ID"> <ResourceAction Name="MyCompany_ToolA"/> </ResourceCategory> <!-- end com.ibm.commerce.common.objects.StoreEntityResourceCategory --> <ActionGroup Name="MyCompany_ToolA" OwnerID="RootOrganization"> <ActionGroupAction Name="MyCompany_ToolA"/> </ActionGroup> <Policy Name="ToolAUsersForOrgExecuteCatalogToolActionsOnStoreEntityResource" OwnerID="RootOrganization" UserGroup="ToolAGroupViewersForOrg" ActionGroupName="MyCompany_ToolA" ResourceGroupName="StoreEntityDataResourceGroup" PolicyType="groupableTemplate"> </Policy> <PolicyGroup Name="ManagementAndAdministrationPolicyGroup" OwnerID="RootOrganization"> <PolicyGroupPolicy Name="ToolAUsersForOrgExecuteToolAActionsOnStoreEntityResource" PolicyOwnerID="RootOrganization" /> </PolicyGroup> </Policies>
This policy file can be loaded by acpload utility after the acugload utility is called above.
BOD Summary
Access Profile and Expression Builder columns are for Get BOD only.
BOD Action Code / Access Profile Action Expression Service Provided Sample XML Message Client Library / Expression Builder GetOnlineStore {_wcf.ap=$accessProfile$;_wcf.usage='$usage$'}/OnlineStore This query will find all stores where the current user has the ability to perform the specified right. For example, the query to return the online stores where the current user can manage the online stores' catalog would be...
[_wcf.ap=IBM_Summary;_wcf.usage="IBM_CatalogTool"]/OnlineStoreSummaryRequest
SummaryResponse DetailsRequest
DetailsResponse AllRequest
AllResponseInfrastructureFacadeClient.getOnlineStore(String,String) / findAll {_wcf.ap=$accessProfile$;_wcf.usage='$usage$'}/OnlineStore[StoreIdentifier[(UniqueID='$storeId$')]] The XPath will find the store with the specified internal store ID found at STOREENT.STOREENT_ID. SummaryRequest
SummaryResponse DetailsRequest
DetailsResponse AllRequest
AllResponseInfrastructureFacadeClient.getOnlineStore(String,String) / findByUniqueID {_wcf.ap=$accessProfile$;_wcf.usage='$usage$'}/OnlineStore[StoreIdentifier[ExternalIdentifier[(NameIdentifier='$storeName$')]]] The XPath will find the store with the exact name specified in the query for the current user with the specified usage. SummaryRequest
SummaryResponse DetailsRequest
DetailsResponse AllRequest
AllResponseInfrastructureFacadeClient.getOnlineStore(String,String) / N/A {_wcf.ap=$accessProfile$;_wcf.usage='$usage$'}/OnlineStore[StoreIdentifier[ExternalIdentifier[(contains(NameIdentifier,'$storeName$'))]]] The XPath will find the store with the store name containing the string specified in the query for the current user with the specified usage.
If the "$storeName$" is an empty string, all stores that are allowed for the specified usage will be returned.SummaryRequest
SummaryResponseInfrastructureFacadeClient.getOnlineStore(String,String) / N/A {_wcf.ap=$accessProfile$;_wcf.usage='$usage$'}/OnlineStore[StoreIdentifier[ExternalIdentifier[(starts-with(NameIdentifier,'$storeName$'))]]] The XPath will find the store with the store name starting with the string specified in the query for the current user with the specified usage.
If the "$storeName$" is an empty string, all stores that are allowed for the specified usage will be returned.SummaryRequest
SummaryResponseInfrastructureFacadeClient.getOnlineStore(String,String) / N/A {_wcf.ap=$accessProfile$;_wcf.usage='$usage$'}/OnlineStore[StoreIdentifier[ExternalIdentifier[(ends-with(NameIdentifier,'$storeName$'))]]] The XPath will find the store with the store name ending with the string specified in the query for the current user with the specified usage.
If the "$storeName$" is an empty string, all stores that are allowed for the specified usage will be returned.SummaryRequest
SummaryResponseInfrastructureFacadeClient.getOnlineStore(String,String) / N/A {_wcf.ap=$accessProfile$;_wcf.usage='$usage$'}/OnlineStore[search(StoreIdentifier/ExternalIdentifier/NameIdentifier='$storeName$')]
{_wcf.ap=$accessProfile$;_wcf.usage='$usage$'}/OnlineStore[search(contains(StoreIdentifier/ExternalIdentifier/NameIdentifier,'$storeName$'))]
{_wcf.ap=$accessProfile$;_wcf.usage='$usage$'}/OnlineStore[search(starts-with(StoreIdentifier/ExternalIdentifier/NameIdentifier,'$storeName$'))]
{_wcf.ap=$accessProfile$;_wcf.usage='$usage$'}/OnlineStore[search(ends-with(StoreIdentifier/ExternalIdentifier/NameIdentifier,'$storeName$'))]
The XPath will find the store that has a name that exactly matches part of the string specified in the query for the current user with the specified usage. This search() syntax can be used by any LOB tools so that store name input like "abc*", "*abc*", "*abc" or "abc" can be converted to the corresponding XPath using SearchExpressionBuilder utility. SearchSummaryRequest
SearchSummaryResponse SearchContainsSummaryRequest
SearchContainsSummaryResponse SearchStartsSummaryRequest
SearchStartsSummaryResponse SearchEndsSummaryRequest
SearchEndsSummaryResponseInfrastructureFacadeClient.getOnlineStore(String,String) / findByName
Access Profile
Access Profile Data Returned Description Sample XML Message IBM_Summary
- OnlineStoreIdentifier (StoreIdentifierType)
IBM_Details
- Everything from IBM_Summary access profile
- OnlineStoreDescription (OnlineStoreDescriptionType)
- State
- StoreType
- DefaultCurrency
- DefaultLanguage
IBM_All
- Everything from IBM_Details access profile
- OnlineStoreContactInfo
- OnineStoreLocationInfo
- UserData
XSD files
Topic URL: _vcc_freeselect_bottom_